from django.conf.urls.defaults import *
urlpatterns = patterns('mysite.polls.views',
                       (r'^$', 'index'),
                       (r'^(?P<poll_id>\d+)/$', 'detail'),                       
                       # This is how the below regular expressions work.
                       # detail(request=<HttpRequest object>, poll_id='23')
                       # The poll_id='23' part comes from (?P<poll_id>\d+).
                       # Using parenthesis around a pattern "captures" the text matched by that pattern and
                       # sends it as an argument to the view function; the ?P<poll_id> defines the name that
                       # will be used to identify the matched pattern; and \d+ is a regular expression to
                       # match a sequence of digits (i.e., a number).


                       (r'^(?P<poll_id>\d+)/results/$', 'results'),
                       (r'^(?P<poll_id>\d+)/vote/$', 'vote'),

                       
                       
)
